package model

/*******************************************************************************
Copyright:cloud
Author:cloudapex@126.com
Version:1.0
Date:2020-09-29
Description: 登陆时获取权限接口
*******************************************************************************/
import (
	"context"
	"service/ctrl"
	"service/model/mod"

	gpb "gitee.com/cloudapex/protos/permis/pb"

	"google.golang.org/grpc"
)

var Login login

func init() {
	ctrl.GCon.RegistClienter(mod.GCONN_PERMIS, func(c *grpc.ClientConn) { Login.cli = gpb.NewLoginClient(c) })
}

type login struct {
	cli gpb.LoginClient
}

func (this *login) MyPermis(ctx context.Context, in *gpb.MyPermisReq) (*gpb.MyPermisRes, error) {
	return this.cli.MyPermis(ctx, in)
}
